home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / DuchessLuynes.dxr / playing cards_63_f2.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.5 KB  |  60 lines

  1. property spriteNum, row, basecard
  2. global stock, foundation, equal, currentsel, getlist, godlist, basecard, leftlist, rightlist, mysuitt
  3.  
  4. on beginSprite me
  5.   row = determinerow()
  6.   basecard = "ace"
  7. end
  8.  
  9. on determinerow me
  10.   if spriteNum = 41 then
  11.     return #ffive
  12.   else
  13.     if spriteNum = 42 then
  14.       return #fsix
  15.     else
  16.       if spriteNum = 43 then
  17.         return #fseven
  18.       else
  19.         if spriteNum = 44 then
  20.           return #feight
  21.         end if
  22.       end if
  23.     end if
  24.   end if
  25. end
  26.  
  27. on mouseEnter me
  28.   if getlist <> VOID then
  29.     if foundation[row].getcardcount() = 0 then
  30.       if getlist.getlastcard().rank = basecard then
  31.         if not mysuitt.findPos(getlist.getlastcard().suit) then
  32.           equal = 1
  33.           currentsel = spriteNum - 4
  34.           godlist = foundation[row]
  35.         else
  36.           if (getlist = foundation[#ffive]) or (getlist = foundation[#fsix]) or (getlist = foundation[#fseven]) or (getlist = foundation[#feight]) then
  37.             equal = 1
  38.             currentsel = spriteNum - 4
  39.             godlist = foundation[row]
  40.           end if
  41.         end if
  42.       end if
  43.     else
  44.       if foundation[row].getcardcount() > 0 then
  45.         if (getlist.getlastcard().rankvalue = (foundation[row].getlastcard().rankvalue + 1)) and (getlist.getlastcard().suit = foundation[row].getlastcard().suit) then
  46.           equal = 1
  47.           currentsel = spriteNum - 4
  48.           godlist = foundation[row]
  49.         end if
  50.       end if
  51.     end if
  52.   end if
  53. end
  54.  
  55. on mouseLeave me
  56.   equal = 0
  57.   currentsel = 0
  58.   godlist = VOID
  59. end
  60.